<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsSkuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods_sku', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();

            $table->decimal('price',10)->default(0.00)->unsigned()->comment('价格');

            $table->integer('num')->default(0)->unsigned()->comment('库存量');

            $table->integer('goods_id')->default(0)->unsigned()->comment('商品id');



        });


        DB::statement("ALTER TABLE `goods_sku` COMMENT='商品sku表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods_sku');
    }
}
